<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //concat 方法用于多个数组的合并。它将新数组的成员，添加到原数组成员的后部，然后返回一个新数组，原数组不变
        var arr = ["i","love","you"];
        console.log(arr);
        console.log(arr.concat("Y","R","Q"));

        var arr1=["尚学堂","百战程序员"];
        var arr2=["sxt","itbaizhan"];
        console.log(arr1.concat(arr2));
        
        // 除了数组作为参数，concat也接受其它类型的值作为参数，添加到目标数组尾部
        console.log(arr.concat(1,2,3));
        

    </script>
</body>
</html>